Skip to content

Conversation

@oesteban
Copy link
Member

@oesteban oesteban commented May 5, 2020

This is a replacement for ANTs' ResampleImageBySpacing with a more
rigorous handling of NIfTI x-form headers.

cc/ @eilidhmacnicol

This may also be useful to @mgxd in the adaptation of antsBrainExtraction to infants.

@effigies' pair of eyes will be very much appreciated, as this new interface plays quite a bit with nibabel's image objects.

@oesteban oesteban requested a review from mgxd May 5, 2020 00:32
@pull-assistant
Copy link

pull-assistant bot commented May 5, 2020

@pep8speaks
Copy link

pep8speaks commented May 5, 2020

Hello @oesteban, Thank you for updating!

Cheers! There are no style issues detected in this Pull Request. 🍻 To test for issues locally, pip install flake8 and then run flake8 niworkflows.

Comment last updated at 2020-05-28 21:44:55 UTC

@oesteban oesteban force-pushed the enh/resample-interface branch from c203318 to bb1a257 Compare May 5, 2020 00:38
@effigies
Copy link
Member

effigies commented May 5, 2020

Have you looked at nibabel.processing? @kaczmarj just added a conform function in 3.1 that might do a lot of this.

I'll try to have a look tomorrow. I know I'm saying that a lot these days...

@oesteban
Copy link
Member Author

oesteban commented May 5, 2020

Have you looked at nibabel.processing? @kaczmarj just added a conform function in 3.1 that might do a lot of this.

Thanks, I wasn't aware of that new module. I guess I could use some of the sanity checks he introduced there, but overall this feels more complementary than overlapping. Let me know what you think whenever you find the time :) - no rush.

@codecov
Copy link

codecov bot commented May 5, 2020

Codecov Report

Merging #511 into master will increase coverage by 8.27%.
The diff coverage is 75.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #511      +/-   ##
==========================================
+ Coverage   51.18%   59.46%   +8.27%     
==========================================
  Files          43       42       -1     
  Lines        5279     5331      +52     
  Branches      770      775       +5     
==========================================
+ Hits         2702     3170     +468     
+ Misses       2486     2034     -452     
- Partials       91      127      +36     
Flag Coverage Δ
#documentation ?
#reportlettests ?
#travis 59.46% <75.00%> (?)
#unittests ?
Impacted Files Coverage Δ
niworkflows/interfaces/images.py 58.00% <73.33%> (+0.62%) ⬆️
niworkflows/utils/images.py 82.75% <75.67%> (-5.25%) ⬇️
niworkflows/func/util.py 25.00% <0.00%> (-62.50%) ⬇️
niworkflows/anat/ants.py 12.15% <0.00%> (-57.46%) ⬇️
niworkflows/anat/freesurfer.py 39.13% <0.00%> (-52.18%) ⬇️
niworkflows/anat/skullstrip.py 30.00% <0.00%> (-50.00%) ⬇️
niworkflows/interfaces/itk.py 26.92% <0.00%> (-12.31%) ⬇️
niworkflows/interfaces/fixes.py 41.17% <0.00%> (-11.77%) ⬇️
niworkflows/interfaces/bids.py 87.45% <0.00%> (-9.06%) ⬇️
niworkflows/interfaces/ants.py 57.81% <0.00%> (-7.82%) ⬇️
... and 13 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a6a328f...68959a1. Read the comment docs.

Copy link
Contributor

@mgxd mgxd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me, just have a question

@oesteban oesteban added this to the 1.3.0 milestone May 22, 2020
oesteban added 5 commits May 28, 2020 14:32
Some instruction above line 190 was in-place modifying the qform matrix
(??). I placed those at the top, directly from the image object (which,
BTW preserved the correct qform at that point).
@oesteban oesteban force-pushed the enh/resample-interface branch from 0f7e429 to 68959a1 Compare May 28, 2020 21:44
@oesteban
Copy link
Member Author

oesteban commented Jun 4, 2020

I'm going to go ahead and hit merge. Please note that this change will break compatibility with rel/1.2.x and therefore a direct merge cannot be done to backport bugfixes.

@oesteban oesteban merged commit c215fc8 into nipreps:master Jun 5, 2020
oesteban added a commit that referenced this pull request Aug 14, 2020
First release in the 1.3.x series. This release includes enhancements and bug-fixes
towards the release of the first LTS version of fMRIPrep.
PyBIDS has been revised to use more recent versions, a series of ANTs' interfaces
have been deemed ready to upstream into Nipype, and several improvements regarding
multi-echo EPI are included.
With thanks to Basile Pinsard for contributions.

  * FIX: Patch ``ApplyTransforms`` spec to permit identity in a chain (#554)
  * FIX: Add dots to extensions in PyBIDS' config file (#548)
  * FIX: Segmentation plots aligned with cardinal axes (#544)
  * FIX: Skip T1w file existence check if ``anat_derivatives`` are provided (#545)
  * FIX: Avoid diverting CIFTI dtype from original BOLD (#532)
  * ENH: Add ``smooth`` input to ``RegridToZooms`` (#549)
  * ENH: Enable ``DerivativesDataSink`` to take multiple source files to derive entities (#547)
  * ENH: Allow ``bold_reference_wf`` to accept multiple EPIs/SBRefs (#408)
  * ENH: Numerical stability of EPI brain-masks using probabilistic prior (#485)
  * ENH: Add a pure-Python interface to resample to specific resolutions (#511)
  * MAINT: Finalize upstreaming of ANTs' interfaces to Nipype (#550)
  * MAINT: Update to Python +3.6 (#541)
HippocampusGirl added a commit to HippocampusGirl/niworkflows that referenced this pull request Sep 29, 2020
1.3.0rc3

First release in the 1.3.x series. This release includes enhancements and bug-fixes
towards the release of the first LTS version of fMRIPrep.
PyBIDS has been revised to use more recent versions, a series of ANTs' interfaces
have been deemed ready to upstream into Nipype, and several improvements regarding
multi-echo EPI are included.
With thanks to Basile Pinsard for contributions.

* FIX: Patch ``ApplyTransforms`` spec to permit identity in a chain (nipreps#554)
* FIX: Add dots to extensions in PyBIDS' config file (nipreps#548)
* FIX: Segmentation plots aligned with cardinal axes (nipreps#544)
* FIX: Skip T1w file existence check if ``anat_derivatives`` are provided (nipreps#545)
* FIX: Avoid diverting CIFTI dtype from original BOLD (nipreps#532)
* ENH: Add ``smooth`` input to ``RegridToZooms`` (nipreps#549)
* ENH: Enable ``DerivativesDataSink`` to take multiple source files to derive entities (nipreps#547)
* ENH: Allow ``bold_reference_wf`` to accept multiple EPIs/SBRefs (nipreps#408)
* ENH: Numerical stability of EPI brain-masks using probabilistic prior (nipreps#485)
* ENH: Add a pure-Python interface to resample to specific resolutions (nipreps#511)
* MAINT: Finalize upstreaming of ANTs' interfaces to Nipype (nipreps#550)
* MAINT: Update to Python +3.6 (nipreps#541)
HippocampusGirl added a commit to HippocampusGirl/niworkflows that referenced this pull request Sep 29, 2020
1.3.0

First release in the 1.3.x series.
This release includes enhancements and bug-fixes towards the release of the first
LTS (*long-term support*) version of *fMRIPrep*.
*PyBIDS* has been revised to use more recent versions, a series of ANTs' interfaces
have been deemed ready to upstream into *Nipype*, and several improvements regarding
multi-echo EPI are included.
With thanks to Basile Pinsard for contributions.

* FIX: Patch ``ApplyTransforms`` spec to permit identity in a chain (nipreps#554)
* FIX: Add dots to extensions in PyBIDS' config file (nipreps#548)
* FIX: Segmentation plots aligned with cardinal axes (nipreps#544)
* FIX: Skip T1w file existence check if ``anat_derivatives`` are provided (nipreps#545)
* FIX: Avoid diverting CIFTI dtype from original BOLD (nipreps#532)
* ENH: Add ``smooth`` input to ``RegridToZooms`` (nipreps#549)
* ENH: Enable ``DerivativesDataSink`` to take multiple source files to derive entities (nipreps#547)
* ENH: Allow ``bold_reference_wf`` to accept multiple EPIs/SBRefs (nipreps#408)
* ENH: Numerical stability of EPI brain-masks using probabilistic prior (nipreps#485)
* ENH: Add a pure-Python interface to resample to specific resolutions (nipreps#511)
* MAINT: Upstream all bug-fixes in the 1.2.9 release
* MAINT: Finalize upstreaming of ANTs' interfaces to Nipype (nipreps#550)
* MAINT: Update to Python +3.6 (nipreps#541)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants